/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.apli.haiam.ejb.entidades;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author Informática
 */
@Entity
@Table(name = "far_servicio")
@NamedQueries({
    @NamedQuery(name = "FarServicio.findAll", query = "SELECT f FROM FarServicio f")})
public class FarServicio implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "fse_id")
    private Integer fseId;
    @Basic(optional = false)
    @Column(name = "fse_nombre")
    private String fseNombre;
    @Basic(optional = false)
    @Column(name = "fse_estado")
    private int fseEstado;
    @OneToMany(mappedBy = "farServicio", fetch = FetchType.LAZY)
    private List<FarTransferencia> farTransferenciaList;
    @OneToMany(mappedBy = "farServicio", fetch = FetchType.LAZY)
    private List<HosRegistroDetalle> hosRegistroDetalleList;
    @OneToMany(mappedBy = "farServicio", fetch = FetchType.LAZY)
    private List<CexPedidoLaboratorio> cexPedidoLaboratorioList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "farServicio", fetch = FetchType.LAZY)
    private List<FarEgreso> farEgresoList;

    public FarServicio() {
    }

    public FarServicio(Integer fseId) {
        this.fseId = fseId;
    }

    public FarServicio(Integer fseId, String fseNombre, int fseEstado) {
        this.fseId = fseId;
        this.fseNombre = fseNombre;
        this.fseEstado = fseEstado;
    }

    public Integer getFseId() {
        return fseId;
    }

    public void setFseId(Integer fseId) {
        this.fseId = fseId;
    }

    public String getFseNombre() {
        return fseNombre;
    }

    public void setFseNombre(String fseNombre) {
        this.fseNombre = fseNombre;
    }

    public int getFseEstado() {
        return fseEstado;
    }

    public void setFseEstado(int fseEstado) {
        this.fseEstado = fseEstado;
    }

    public List<FarTransferencia> getFarTransferenciaList() {
        return farTransferenciaList;
    }

    public void setFarTransferenciaList(List<FarTransferencia> farTransferenciaList) {
        this.farTransferenciaList = farTransferenciaList;
    }

    public List<HosRegistroDetalle> getHosRegistroDetalleList() {
        return hosRegistroDetalleList;
    }

    public void setHosRegistroDetalleList(List<HosRegistroDetalle> hosRegistroDetalleList) {
        this.hosRegistroDetalleList = hosRegistroDetalleList;
    }

    public List<CexPedidoLaboratorio> getCexPedidoLaboratorioList() {
        return cexPedidoLaboratorioList;
    }

    public void setCexPedidoLaboratorioList(List<CexPedidoLaboratorio> cexPedidoLaboratorioList) {
        this.cexPedidoLaboratorioList = cexPedidoLaboratorioList;
    }

    public List<FarEgreso> getFarEgresoList() {
        return farEgresoList;
    }

    public void setFarEgresoList(List<FarEgreso> farEgresoList) {
        this.farEgresoList = farEgresoList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (fseId != null ? fseId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FarServicio)) {
            return false;
        }
        FarServicio other = (FarServicio) object;
        if ((this.fseId == null && other.fseId != null) || (this.fseId != null && !this.fseId.equals(other.fseId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "newpackage.FarServicio[ fseId=" + fseId + " ]";
    }
    
}
